﻿<phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkitPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="TAXILISM.setting"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	mc:Ignorable="d"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ToggleSwitchButtonStyle1" TargetType="toolkitPrimitives:ToggleSwitchButton">
			<Setter Property="Background" Value="{StaticResource PhoneBackgroundBrush}"/>
			<Setter Property="IsTabStop" Value="False"/>
			<Setter Property="SwitchForeground" Value="{StaticResource PhoneAccentBrush}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="toolkitPrimitives:ToggleSwitchButton">
						<Border x:Name="Root" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CacheMode="BitmapCache" Opacity="{TemplateBinding Opacity}" Padding="{TemplateBinding Padding}">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ColorAnimation Duration="0" To="{StaticResource PhoneForegroundColor}" Storyboard.TargetProperty="(Grid.Background).(SolidColorBrush.Color)" Storyboard.TargetName="SwitchBottom"/>
											<ColorAnimation Duration="0" To="{StaticResource PhoneForegroundColor}" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="ThumbCenter"/>
											<DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="CheckStates">
									<VisualStateGroup.Transitions>
										<VisualTransition GeneratedDuration="0:0:0.05" To="Unchecked"/>
										<VisualTransition GeneratedDuration="0:0:0.05" To="Checked"/>
									</VisualStateGroup.Transitions>
									<VisualState x:Name="Checked">
										<Storyboard>
											<DoubleAnimation Duration="0" To="68" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="BackgroundTranslation">
												<DoubleAnimation.EasingFunction>
													<ExponentialEase EasingMode="EaseOut" Exponent="15"/>
												</DoubleAnimation.EasingFunction>
											</DoubleAnimation>
											<DoubleAnimation Duration="0" To="68" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="ThumbTranslation">
												<DoubleAnimation.EasingFunction>
													<ExponentialEase EasingMode="EaseOut" Exponent="15"/>
												</DoubleAnimation.EasingFunction>
											</DoubleAnimation>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Dragging"/>
									<VisualState x:Name="Unchecked">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="BackgroundTranslation"/>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(TranslateTransform.X)" Storyboard.TargetName="ThumbTranslation"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Grid x:Name="SwitchRoot" Background="Transparent">
								<Grid x:Name="SwitchTrack" Width="88">
									<Grid x:Name="SwitchBottom" Background="{TemplateBinding SwitchForeground}" Height="32">
										<Rectangle x:Name="SwitchBackground" Fill="{TemplateBinding Background}" HorizontalAlignment="Center" Height="20" VerticalAlignment="Center" Width="76">
											<Rectangle.RenderTransform>
												<TranslateTransform x:Name="BackgroundTranslation"/>
											</Rectangle.RenderTransform>
										</Rectangle>
										<Border BorderThickness="2">
											<Border.BorderBrush>
												<SolidColorBrush Color="#FF1A1A1A"/>
											</Border.BorderBrush>
											<Border BorderThickness="4">
												<Border.BorderBrush>
													<SolidColorBrush Color="White"/>
												</Border.BorderBrush>
											</Border>
										</Border>
									</Grid>
									<Border x:Name="SwitchThumb" BorderThickness="4,0" HorizontalAlignment="Left" Height="36" Margin="-4,0" Width="28">
										<Border.BorderBrush>
											<SolidColorBrush Color="#FF1A1A1A"/>
										</Border.BorderBrush>
										<Border.RenderTransform>
											<TranslateTransform x:Name="ThumbTranslation"/>
										</Border.RenderTransform>
										<Border x:Name="ThumbCenter" BorderThickness="2" Background="White">
											<Border.BorderBrush>
												<SolidColorBrush Color="#FF1A1A1A"/>
											</Border.BorderBrush>
										</Border>
									</Border>
								</Grid>
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		
		<!--TitlePanel contains the name of the application and page title-->
		<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="0,0,0,28">
			<Grid Background="#E5000000">
				<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="TAXILISM" d:LayoutOverrides="Height" FontFamily="Segoe WP Black" FontSize="21.333" Margin="20,5,0,5" Foreground="#FFFFC700"/>
			</Grid>
			<TextBlock x:Name="PageTitle" Text="settings" Margin="20,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Foreground="#FF1A1A1A"/>
		</StackPanel>

		<!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
			<StackPanel VerticalAlignment="Top" Margin="8,0,0,0">
				<StackPanel Orientation="Horizontal">
					<TextBlock TextWrapping="Wrap" Text="Allow Location Service" FontSize="29.333" VerticalAlignment="Center" FontFamily="Segoe WP" Foreground="#FF1A1A1A"/>
					<toolkitPrimitives:ToggleSwitchButton x:Name="allowSw" Content="ToggleSwitchButton" Background="#FF1A1A1A" Foreground="#DE000000" Margin="40,0,0,0" Style="{StaticResource ToggleSwitchButtonStyle1}" SwitchForeground="#FFFFC700" Checked="allowSw_Checked" Unchecked="allowSw_Unchecked"/>
				</StackPanel>
				<TextBlock x:Name="chkTxt" TextWrapping="Wrap" Text="Not Allow" FontFamily="Segoe WP" Foreground="#FFFFC700" HorizontalAlignment="Left" Margin="0,0,50,0" FontWeight="Bold"/>
				<TextBlock TextWrapping="Wrap" Text="Location Service Privacy" FontFamily="Segoe WP Semibold" Foreground="#FF1A1A1A" HorizontalAlignment="Left" FontWeight="Bold" Margin="0,30,0,0" TextDecorations="Underline" FontSize="24"/>
				<TextBlock TextWrapping="Wrap" Text="If you allow Location Service on this application, You can use your current location to calculate a taxi fare. This application only uses your location data as an input of search box and doesn't share your location data anyway." FontFamily="Segoe WP" Foreground="#FF1A1A1A" HorizontalAlignment="Left" Margin="0,5,0,0" FontSize="20"/>
			</StackPanel>
		</Grid>
	</Grid>
</phone:PhoneApplicationPage>